local skel = fk.CreateSkill {
  name = "emo__liuzhi_select",
}

Fk:loadTranslationTable{
  ["emo__liuzhi_select"] = "六制",
}

local getValue = function (id)
  local c = Fk:getCardById(id)
  if c.sub_type == Card.SubtypeWeapon then
    return 3
  elseif c.trueName == "slash" then
    return 2
  end
  return 1
end

skel:addEffect("active", {
  min_card_num = 6,
  target_num = 0,
  card_filter = function (self, player, to_select, selected)
    return not  player:prohibitDiscard(to_select)
  end,
  feasible = function (self, player, selected, selected_cards)
    local sum = 0
    for _, id in ipairs(selected_cards) do
      sum = sum + getValue(id)
    end
    return sum >= 6
  end,
})

return skel
